args: api_client.MappedArgs = api_client.MappedArgs()
{{#if queryParams}}
_query_params = {}
{{/if}}
{{#if headerParams}}
_header_params = {}
{{/if}}
{{#if pathParams}}
_path_params = {}
{{/if}}
{{#if cookieParams}}
_cookie_params = {}
{{/if}}
{{#if bodyParam}}
{{#with bodyParam}}
_body = {}
{{#each flattenedParamsFromRequestBodyProperties}}
if {{{paramName}}} is not None:
    _body["{{{baseName}}}"] = {{{paramName}}}
{{/each}}
args.body = {{#if isStrictlyObject}}{{#if @root.keepAllParametersOptional}}body if body is not None else _body{{else}}_body{{/if}}{{else}}body if body is not None else _body{{/if}}
{{/with}}
{{/if}}
{{#each queryParams}}
if {{{paramName}}} is not None:
    _query_params["{{{baseName}}}"] = {{{paramName}}}
{{/each}}
{{#each headerParams}}
if {{{paramName}}} is not None:
    _header_params["{{{baseName}}}"] = {{{paramName}}}
{{/each}}
{{#each pathParams}}
if {{{paramName}}} is not None:
    _path_params["{{{baseName}}}"] = {{{paramName}}}
{{/each}}
{{#each cookieParams}}
if {{{paramName}}} is not None:
    _cookie_params["{{{baseName}}}"] = {{{paramName}}}
{{/each}}
{{#if queryParams}}
args.query = {{#if @root.keepAllParametersOptional}}query_params if query_params else _query_params{{else}}_query_params{{/if}}
{{/if}}
{{#if headerParams}}
args.header = {{#if @root.keepAllParametersOptional}}header_params if header_params else _header_params{{else}}_header_params{{/if}}
{{/if}}
{{#if pathParams}}
args.path = {{#if @root.keepAllParametersOptional}}path_params if path_params else _path_params{{else}}_path_params{{/if}}
{{/if}}
{{#if cookieParams}}
args.cookie = {{#if @root.keepAllParametersOptional}}cookie_params if cookie_params else _cookie_params{{else}}_cookie_params{{/if}}
{{/if}}
return args
